home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 60
/
64er_Magazin_Sonderheft_60_19xx_Markt__Technik_de_Side_A.d64
/
adv geruest
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
95 lines
1 rem ******************************
2 rem * adventuregeruest *
3 rem * c 64 --- basic *
4 rem ******************************
5 :
6 rem initialisieren
7 :
10 dim r$(4),r(4),ob$(20),ob(20)
20 r$(1)="norden ":r$(2)="osten "
25 r$(3)="sueden ":r$(4)="westen "
30 oa=2 :rem anzahl der objekte !!!
34 :
35 rem objekte lesen
36 :
40 restore
41 readzz$:ifzz$<> "#" then41
45 for t=1 to oa:read ob(t),ob$(t):next
60 rem zimmer 1 ist anfang
65 zn=1:gosub 8000
70 gosub 8100
75 gosub 8200
97 :
98 rem hauptschleife
99 :
100 input"befehl";a$
110 if len(a$) >1 then 200
120 for t=1 to 4
130 if left$(r$(t),1)=a$ then 150
140 next t: goto 100
150 if r(t)=0then100:rem nicht zulaessig
152 if r(t)=128thenend:rem tot
155 zn=r(t)
160 gosub 8000
170 gosub 8100
180 gosub 8200
190 goto 100
200 gosub 8400
210 gosub 1000:goto 100
997 :
998 rem vokabular und logik
999 :
1000 if v$="holen" and o$="bleistift" and zn=ob(2) then ob(2)=0
1100 if v$="hinlegen" and o$="bleistift" and ob(2)=0 then ob(2)=zn
7900 gosub 8100:gosub 8200
7910 return
7998 :
7999 :
8000 restore
8001 readzz$:ifzz$<>"$"then8001
8010 for t=1 to zn
8020 for t1=1 to4
8030 read r(t1)
8040 next t1
8050 read tx$
8060 next t
8070 return
8098 :
8099 :
8100 print"[147]";
8110 printtx$""
8120 print"ausgaenge:"
8130 for t=1 to 4
8140 if r(t) >0 then print r$(t);
8150 next t
8160 print""
8170 return
8198 :
8199 :
8200 :
8205 print"du siehst"
8210 for t=1 to oa
8220 if ob(t)<>zn then 8240
8230 print ob$(t);" ";
8240 next t
8245 print""
8250 return
8398 :
8399 :
8400 for t=1 to len(a$)
8410 if mid$(a$,t,1)=" " then 8430
8420 next t:v$="":o$="":return
8430 o$=left$(a$,t-1)
8440 v$=right$(a$,len(a$)-t)
8450 return
9998 :
9999 :
10000 data "$"
10001 data 2,3,0,128,"zimmer 1"
10002 data 0,4,1,0,"zimmer 2"
10003 data 4,0,0,1,"zimmer 3"
10004 data 0,0,3,2,"zimmer 4"
12000 data "#"
12001 data 0,"papier"
12002 data 1,"bleistift